<html>
    <head>
        <style type="text/css">
            #word{
                font-size:16px;
                font-weight:bold;
                margin: 0 auto;
                width: 100px;
                padding:0;
            }
            #translation{
                display: none;
                font-style: italic;
                font-size: 14px;
                margin: 0 auto;
                width: 100px;
                padding:0;
            }
        </style>
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
        <script type="text/javascript">					
            var cardsJson = jQuery.parseJSON(localStorage.getItem('cards'));            
			$(function(){
				var randCard = Math.floor ( Math.random() * cardsJson.length );
				var randWord = Math.floor(Math.random() * 2);
				var randCard = cardsJson[randCard].split(localStorage.getItem('separator'));
				$("#word").text(randCard[randWord]);
				$("#translation").text(randCard[Math.abs(randWord-1)]);
			});
            setTimeout(function(){
                $("#translation").show();
            },3000);
        </script>
    </head>
    <body>
        <div id="word">Word</div>
        <div id="translation">Translation</div>
    </body>
</html>